<!DOCTYPE html>

<html>

	<head>

		<meta charset="utf-8">
		<meta charset="UTF-8" name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
		<title></title>

	<script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script></head>

	<body>



		<div class="mask-box">

			<div class="login-box">

				<p class="title">立即登录</p>



				<div class="btn-list">
					<!-- <a style="text-decoration: none" href="sanjie://"> -->
					<div class="btn left" onclick="openApp()">已有账号</div>
					<!-- </a> -->

					<a style="text-decoration: none" href="{:url('zi_liao/web_register',['user_id'=>input('user_id')])}">
						<div class="btn right">我要注册</div>
					</a>

				</div>

			</div>


		</div>

		<div id="open-obswer" onclick="displayMask()">
			<img src="open-obswer.png" />
		</div>

	</body>

</html>



<script src="/new/mask/js/public.js"></script>

<script>
	function displayMask(){
		var mask= document.getElementById('open-obswer')
		mask.style.display='none'
	}
	
	function openApp() {
		const ua = window.navigator.userAgent.toLowerCase();
		console.log(ua)

		if (navigator.userAgent.match(/(iPhone|iPod|iPad|iOS);?/i)) {
			const loadDateTime = +new Date();
			
			if (ua.match(/MicroMessenger/i) == "micromessenger") {
				var openObMask= document.getElementById('open-obswer')
				openObMask.style.display= 'block'
			} else {
				window.location.href = "SJculture://"; // ios对应的app协议
				
				window.setTimeout(function() {
					const timeOutDateTime = +new Date();
					if ((timeOutDateTime - loadDateTime) < 5000) {
				
						window.location.href = 'http://app253.app.longcai.net/home/zi_liao/choose_system'; // ios下载地址
					} else {
						window.close();
					}
				}, 2000);
			}

		} else if (navigator.userAgent.match(/android/i)) {
			const state = null;
			if (ua.match(/MicroMessenger/i) == "micromessenger") {
				var openObMask= document.getElementById('open-obswer')
				openObMask.style.display= 'block'
			} else {
				try {
					window.location.href = 'sanjie://caishi:8080/loadtooldetail'; // 安卓对应的app协议
					setTimeout(function() {
						window.location.href = 'http://app253.app.longcai.net/home/zi_liao/choose_system'; // android下载地址
					}, 500);

				} catch (e) {}
			}

		}
	}
</script>


<style scoped>
	#open-obswer {
		width: 100%;

		height: 100%;

		position: fixed;

		top: 0;

		left: 0;

		background-color: rgba(0, 0, 0, .3);
		z-index: 10;
		display: none;
	}
	
	#open-obswer img{
		width: 90%;
		height: 1.98rem;
		position: fixed;
		left: 50%;
		top: 0;
		transform: translateX(-50%);
	}
	
	.mask-box {

		width: 100%;

		height: 100%;

		position: fixed;

		top: 0;

		left: 0;

		background-color: rgba(0, 0, 0, .2);

	}

	.login-box {

		width: 5.70rem;

		height: 3.40rem;

		background-color: #FFFFFF;

		position: fixed;

		top: 50%;

		left: 50%;

		margin: -1.70rem -2.85rem;

		border-radius: .10rem;

		padding: .75rem .83rem;

		box-sizing: border-box;

		display: flex;

		flex-direction: column;

		justify-content: space-between;

	}

	.title {

		font-size: .36rem;

		text-align: center;

		font-weight: 600;

		margin: 0;

	}

	.btn-list {

		display: flex;

		justify-content: space-between;

	}

	.btn {

		width: 1.74rem;

		height: .58rem;

		border: .01rem solid #cf2b37;

		border-radius: .05rem;

		text-align: center;

		line-height: .58rem;

		font-size: .28rem;

	}

	.left {

		color: #cf2b37;

	}

	.right {

		background-color: #cf2b37;

		color: #FFFFFF;

	}
</style>
